package com.bytezero.login_test.home;

import com.bytezero.login_test.bean.BaseBean;
import com.bytezero.login_test.bean.Goods;
import com.bytezero.login_test.network.RetrofitClient;
import com.bytezero.login_test.service.GoodsService;

import java.util.List;

import io.reactivex.rxjava3.core.Flowable;

/**
 * @author Bytezero_zhenglei!
 * @package com.bytezero.login_test.home
 * @fileName
 * @data 2022/1/28 16:39
 * @description
 * @TODO
 * @email 420498246@qq.com
 */
public class HomeModel implements HomeContract.IHomeModel {

    //从网络获取
    @Override
    public Flowable<BaseBean<List<Goods>>> getData() {


        return RetrofitClient.getmInstance().getService(GoodsService.class)
                .getGoods();
    }
}
